﻿@using System.Data
@using ZoomLa.Common
@using ZoomLa.BLL
@model ZoomLa.SQLDAL.SQL.PageSetting
@{
    Model.url = "GuestShow_Data";
}
@functions{
    public string GetUserName(int userid)
    {
        return new B_User().GetSelect(userid).UserName;
    }
}
<div id="EGV">
    @if (Model.itemCount > 0)
    {
        <div class="media-list g_show_list">
            @foreach (DataRow dr in Model.dt.Rows)
            {
            <div class="media">
                <div class="media-left">
                    <img src="@dr["UserFace"]" alt="@GetUserName(@Convert.ToInt32(dr["UserID"]))" onerror="javascript:this.src='/Images/userface/noface.png';" />
                    <br />@GetUserName(@Convert.ToInt32(dr["UserID"]))
                </div>
                <div class="media-body">
                    <div class="g_show_list_c">@MvcHtmlString.Create(dr["TContent"].ToString())</div>
                    <div class="r_gray text-right">
                        @if (DataConverter.CLng(dr["Parentid"]) == 0)
                        {
                            <span style="margin-right:5px;"><label>发表人:@GetUserName(@Convert.ToInt32(dr["UserID"]))</label></span>
                        }
                        else
                        {
                            <span style="margin-right:5px;"><label>回复人:</label>@GetUserName(@Convert.ToInt32(dr["UserID"]))</span>
                        }
                        <i class="fa fa-clock-o"></i>@Convert.ToDateTime(dr["GDate"]).ToString("yyyy-MM-dd HH:mm")
                    </div>

                </div>
            </div>
            }
        </div>
        <div class="text-center">
            @Html.Partial("_page2", Model)
        </div>
    }

</div>